package com.watcloud.plugin.impl.postgresql;

import com.alibaba.nacos.plugin.datasource.mapper.ConfigInfoTagMapper;
import com.watcloud.plugin.constants.DataSourceConstant;

import java.util.Collections;

public class ConfigInfoTagMapperByPostgresql extends PostgresqlAbstractMapper implements ConfigInfoTagMapper {

	@Override
	public String getDataSource() {
		return DataSourceConstant.POSTGRESQL;
	}

	@Override
	public String findAllConfigInfoTagForDumpAllFetchRows(int startRow, int pageSize) {
		return " SELECT t.id,data_id,group_id,tenant_id,tag_id,app_name,content,md5,gmt_modified "
				+ " FROM (  SELECT id FROM config_info_tag  ORDER BY id LIMIT " + pageSize + " offset "
				+ startRow + " ) " + "g, config_info_tag t  WHERE g.id = t.id  ";
	}
}
